<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head></head>
<body>
 <div class="navbox">
	<div class="globalnav"> 
	    <a href="<%=request.getContextPath()%>/shopper/list" class="ed">
	    <span>进店统计</span>
	    </a> 
	    <a href="<%=request.getContextPath()%>/user/list">
	    <span>账号管理</span>
	    </a> 
    </div>
    <div class="subnav">
    	<a href="<%=request.getContextPath()%>/shopper/list" >
    		<span>今日进店</span>
    	</a>
    	<span class="line">|</span> 
   		<a href="<%=request.getContextPath()%>/shopper/query" class="ed">
    		<span>进店统计</span>
    	</a>
    </div>
  </div>

  <!--     主体从这开始    -->
  <div class="container">
    <h2 class="tit">
    	<a href="${ctx}/shopper/query" class="current">进店查询</a>
   		<a href="${ctx}/shopper/weekreport">周报表</a>
   		<a href="">月报表</a>
    </h2>
     <form action="${ctx}/shopper/query" method="post" id="form1">
     <table class="global_table" cellpadding="0" cellspacing="0"> 
       <tr>
        <th class="width135">进店时间：</th>
        <td class="width320">从
          <input type="text" class="g_inp width100 Wdate" name="startDate" readonly="readonly" id="startDate" value="${valueList.valueListInfo.filters.startDate}" onclick="WdatePicker({maxDate:'#F{$dp.$D(\'endDate\')}'})" />
         	 至
         <input type="text" class="g_inp width100 Wdate" name="endDate" readonly="readonly" id="endDate" value="${valueList.valueListInfo.filters.endDate}" onclick="WdatePicker({minDate:'#F{$dp.$D(\'startDate\')}'})" />
      </td>
        <th class="width135">接待人：</th>
        <td class="width320">
        	<select name="receptionistId" class="width100" id="receptionistId">
        		<option value="">全部</option>
        		<c:forEach items="${users}" var="u">
        			<option value="${u.id}" <c:if test="${valueList.valueListInfo.filters.receptionistId eq u.id}">selected="selected"</c:if>>${u.name}</option>
        		</c:forEach>
          </select>
        </td>
      </tr>
      <tr>
      	<th style="width:135px;">自然/经营性进店:</th> 
        <td>
        	<select name="intoType">
        		<option value="">全部</option>
        		<option value="自然性进店" <c:if test="${valueList.valueListInfo.filters.intoType eq  '自然性进店'}">selected="selected"</c:if>>自然性进店</option>
        		<option value="经营性进店" <c:if test="${valueList.valueListInfo.filters.intoType eq  '经营性进店'}">selected="selected"</c:if>>经营性进店</option>
        	</select>
      	</td>
      	<th style="width:135px;">新/老顾客：</th> 
        <td>
        	<select name="newOrOld">
        		<option value="">全部</option>
        		<option value="新顾客" <c:if test="${valueList.valueListInfo.filters.newOrOld eq  '新顾客'}">selected="selected"</c:if>>新顾客</option>
        		<option value="老顾客" <c:if test="${valueList.valueListInfo.filters.newOrOld eq  '老顾客'}">selected="selected"</c:if>>老顾客</option>
        	</select>
      	</td>  
      	</tr>
      	<tr>
        <th style="width:110px;">进店结果：</th> 
        <td colspan="3">
       		<select name="result">
        		<option value="">全部</option>
        		<option value="购买" <c:if test="${valueList.valueListInfo.filters.result eq  '购买'}">selected="selected"</c:if>>购买</option>
        		<option value="试穿" <c:if test="${valueList.valueListInfo.filters.result eq  '试穿'}">selected="selected"</c:if>>试穿</option>
        		<option value="留下电话" <c:if test="${valueList.valueListInfo.filters.result eq  '留下电话'}">selected="selected"</c:if>>留下电话</option>
        		<option value="有沟通" <c:if test="${valueList.valueListInfo.filters.result eq  '有沟通'}">selected="selected"</c:if>>有沟通</option>
        		<option value="没有沟通" <c:if test="${valueList.valueListInfo.filters.result eq  '没有沟通'}">selected="selected"</c:if>>没有沟通</option>
        		<option value="售后" <c:if test="${valueList.valueListInfo.filters.result eq  '售后'}">selected="selected"</c:if>>售后</option>
        	</select>
      </td>
      </tr> 
    </table> 
  
   <br />
    <center>
      <input type="submit" class="g_btn_blue" value="查  询" id="searchBtn"/>
    </center>
    </form>
    <br/><br/>
    
    <div class="receipt_result receipt_result4" align="center" style="margin-top:5px;">
    	<p>
    		<span>进店统计 (${user.store}) </span>
    	</p>
    	<p>
	   		进店总人数: ${allEnterCount}
	   		&nbsp;&nbsp;&nbsp;&nbsp;
	   		总试穿人数：${allTryonCount}
	   		&nbsp;&nbsp;&nbsp;&nbsp;
	   		总成交人数：${allTradeCount}
	   		&nbsp;&nbsp;&nbsp;&nbsp;
	   		总试穿率：${tryonPre}%
	   		&nbsp;&nbsp;&nbsp;&nbsp;
	   		总成交率：${tradePre}%
	   		&nbsp;&nbsp;&nbsp;&nbsp;
	   		总成交金额：${allTradeAmount}
	   		&nbsp;&nbsp;&nbsp;&nbsp;
	   		总客单价：${amountPre}
   		</p>
   		</div>
   		<br/><br/>
   <c:if test="${valueList.valueListInfo.totalNumberOfEntries>0}">
   <vlh:root value="valueList" url="?" includeParameters="#" > 
   <%@ include file="../commons/valuelist_paging.jsp" %>
	<div class="scroll_tableresult">
    <table class="global_vtable" cellpadding="0" cellspacing="0">
     <thead>
      <tr>
        <th>进店时间</th>
        <th>进店人数</th>
        <th>试穿人数</th>
        <th>成交人数</th>
        <th>接待人</th>
        <th>新/老顾客</th>
        <th>经营/自然进店</th>
        <th>进店结果</th>
        <th>导致结果原因分析</th>
        <th>成交金额</th>
      </tr>
      </thead>
       <tbody>
    	<vlh:row bean="shopper" > 
      	<tr>
       	 	<td><fmt:formatDate value="${shopper.map.enter_date}" pattern="yyyy-MM-dd HH:mm:ss"/> </td>
        	<td>${shopper.map.enter_count}</td>
        	<td>${shopper.map.tryon_count}</td>
        	<td>${shopper.map.trade_count}</td>
        	<td>${shopper.map.receptionist_id}</td>
        	<td>${shopper.map.into_type}</td>
        	<td>${shopper.map.new_or_old}</td>
        	<td>${shopper.map.result}</td>
        	<td>${shopper.map.reason}</td>
        	<td>${shopper.map.trade_amount}</td>
      	</tr>
      	</vlh:row>
      	</tbody>
    </table>
    </div>
    <%@ include file="../commons/valuelist_paging.jsp" %>
    </vlh:root>
    </c:if>
    <c:if test="${valueList.valueListInfo.totalNumberOfEntries<=0}">
		<div class="receipt_result btncenter font14">
			没有符合条件的查询结果！
		</div>
	</c:if>
    
  </div>
    
  <!--     主体 end    -->
</body>
</html>
